﻿@model EM.OA.Portal.Models.MailConfigModels
@{
    Layout = "~/Views/Shared/_LayoutContent.cshtml";
}
<script type="text/javascript" src="~/Scripts/page/Mail/MailConfig.js"></script>
<div>
    @*list*@
    <table id="list" class="easyui-datagrid" toolbar="#toolbar">
    </table>
    <div id="toolbar">
        <a href="#" class="easyui-linkbutton" iconcls="icon-add" plain="true" onclick="add()">增加</a>
        <a href="#" class="easyui-linkbutton" iconcls="icon-edit" plain="true" onclick="edit()">修改</a>
        <a href="#" class="easyui-linkbutton" iconcls="icon-remove" plain="true" onclick="del()">删除</a>
        @*<div id="tb" style="padding: 3px">
            <span>@Html.LabelFor(m => m.WorkPlanName)</span>
            <input id="WorkPlanName" style="line-height: 26px; border: 1px solid #ccc">
            <span>@Html.LabelFor(m => m.WorkPlanType)</span>
            <input id="WorkPlanType" style="line-height: 26px; border: 1px solid #ccc">
            <a href="#" class="easyui-linkbutton" plain="true" onclick="doSearch()">Search</a>
        </div>*@
    </div>

    @*Detail*@
    <div id="dlg" class="easyui-dialog" style="width: 800px; height: 500px; padding: 10px 20px"
        closed="true" buttons="#dlg-buttons" modal="true" resizable="true"
        data-options="
            onOpen:function() { 
            keditor =  KindEditor.create('#Signature',{
            items : [
						        'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						        'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						        'insertunorderedlist', '|', 'emoticons', 'image', 'link']    }); 

             },
            onBeforeClose:function() { 
            keditor.html(''); 
            keditor.remove('#Signature');
            }
    ">
        <div id="dlg-buttons">
            <a href="#" class="easyui-linkbutton" iconcls="icon-ok" onclick="save()">保存</a>
            <a href="#" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">取消</a>
        </div>
        <form id="fm" method="post">
            @Html.HiddenFor(m => m.MailConfigID)
            <div>
                常用设置
                <hr />
            </div>
            <table>
                <tr>
                    <td>@Html.LabelFor(m => m.Nickname)
                        <input name="Nickname" class="easyui-validatebox" data-options="validType:'length[1,100]'">
                    </td>
                    <td>
                        @Html.LabelFor(m => m.IsAutoReceiver)
                        @Html.CheckBoxFor(m => m.IsAutoReceiver)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(m => m.IsSyncSave)
                        @Html.CheckBoxFor(m => m.IsSyncSave)

                    </td>
                    <td>
                        @Html.LabelFor(m => m.IsSyncDelete)
                        @Html.CheckBoxFor(m => m.IsSyncDelete)

                    </td>
                </tr>
                <tr>
                    <td>@Html.LabelFor(m => m.IsAutoSave)
                        @Html.CheckBoxFor(m => m.IsAutoSave)
                    </td>
                    <td>@Html.LabelFor(m => m.IsAutoSaveLinkman)
                        @Html.CheckBoxFor(m => m.IsAutoSaveLinkman)
                    </td>
                </tr>
                <tr>
                    <td>@Html.LabelFor(m => m.IsShowSignature)
                        @Html.CheckBoxFor(m => m.IsShowSignature)
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td>@Html.LabelFor(m => m.Signature)</td>
                    <td>
                        <textarea id="Signature" name="Signature" style="width: 400px; height: 300px;" data-options="validType:'length[1,1000]'" class="easyui-validatebox"></textarea>
                    </td>
                </tr>
            </table>


            <p></p>
            <div>
                邮箱设置
             <hr />
            </div>


            <div>
                @Html.LabelFor(m => m.MailAddress)
                <input name="MailAddress" class="easyui-validatebox" data-options="required:true,validType:['email','length[0,100]']">
                @Html.LabelFor(m => m.MailPassword)
                <input type="password" name="MailPassword" class="easyui-validatebox" data-options="required:true,validType:'length[1,50]'">
            </div>
            <div>
                @Html.LabelFor(m => m.POP3IP)
                <input name="POP3IP" class="easyui-validatebox" data-options="validType:'ip'">
                @Html.LabelFor(m => m.POP3Port)
                <input name="POP3Port" class="easyui-numberbox" data-options="min:1,max:255" />
                @Html.LabelFor(m => m.IsPOP3SSL)
                @Html.CheckBoxFor(m => m.IsPOP3SSL)
            </div>
            <div>
                @Html.LabelFor(m => m.SMTPIP)
                <input name="SMTPIP" class="easyui-validatebox" data-options="validType:'length[1,30]'">
                @Html.LabelFor(m => m.SMTPPort)
                <input name="SMTPPort" class="easyui-numberbox" data-options="min:1,max:255" />
                @Html.LabelFor(m => m.IsSMTPSSL)
                @Html.CheckBoxFor(m => m.IsSMTPSSL)
            </div>
            <div>
                @Html.LabelFor(m => m.IsDefault)
                @Html.CheckBoxFor(m => m.IsDefault)
            </div>
        </form>
    </div>

</div>
